﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FifaChamps.API.Data
{
    public class Result
    {
        public int ResultID { get; protected set; }
        public ResultType? ResultTypeID { get; protected set; }
        public int FixtureID { get; protected set; }
        public int? GoalsFor { get; protected set; }
        public int? GoalsAgainst { get; protected set; }
        public bool? Home { get; protected set; }

        internal Result()
        { }

        internal Result(int id, int? resulttypeid, int fixtureid, int? goalsfor, int? goalsagainst, bool? home)
        {
            ResultID = id;
            ResultTypeID = (resulttypeid.HasValue) ? (ResultType)resulttypeid.Value : new Nullable<ResultType>();
            FixtureID = fixtureid;
            GoalsFor = goalsfor;
            GoalsAgainst = goalsagainst;
            Home = home;
        }

    }

    public enum ResultType
    {
        Win = 1,
        Draw = 2,
        Loss = 3
    }
}
